/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.cput.tp.patterns.behaviour.chainofresponisibility;

/**
 *
 * @author Malotana
 */
public class EarthHandler extends PlanetHandler {
    
    @Override
    public void handleRequest(PlanetEnum request) {
        if(request == PlanetEnum.EARTH){
            System.out.println("Earth handles " + request);
            System.out.println(" Earth is hot.\n");
        } else {
            System.out.println(" MercuryHandler doesn't handle "+ request);
            if ( successor != null){
                successor.handleRequest(request);
            }
        }
    }  
}